package entity

import "github.com/lib/pq"

type Firmware struct {
	Id          int64         `gorm:"column:id;primary_key" json:"id"`
	TypeIds     pq.Int64Array `gorm:"column:type_ids;type:bigint[];not null" json:"type_ids"`
	Name        string        `gorm:"column:name;type:varchar(255);not null" json:"name"`
	FileSize    int           `gorm:"column:file_size;type:integer;not null" json:"file_size"`
	Description string        `gorm:"column:description;type:varchar(255);not null" json:"description"`
	Version     string        `gorm:"column:version;type:varchar(255);not null" json:"version"`
	FilePath    string        `gorm:"column:file_path;type:varchar(255);not null" json:"file_path"`
	CreatedAt   int64         `gorm:"column:created_at;type:bigint;not null" json:"created_at"`
	UpdatedAt   int64         `gorm:"column:updated_at;type:bigint;not null" json:"updated_at"`
}

func (f *Firmware) TableName() string {
	return "firmware"
}
